# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-gitdb
_pkgname=gitdb2
pkgver=2.0.5
pkgrel=3
pkgdesc='A pure-Python git object database.'
url='https://github.com/gitpython-developers/gitdb'
license=('BSD')
arch=('any')
depends=('git' 'python2-smmap')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('a1d52529afa10d01ce96fc33ba7e78e36e841fca8041a416a873075cb0b11b8bdc0bcfaf787918962f3c4eb442ae938c9cd280f85cb3ce71e1c916816018ad10')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

